<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>反面隐藏</title>
	<style>
		.box{
			width: 300px;
			height: 300px;
			margin:0 auto;
			position: relative;
			perspective: 500px;
			/*overflow: hidden;*/
		}
		.box div{
			width: 300px;
			height: 300px;
			transition: all 1s;
			line-height: 300px;
		}
		.box:hover .up{
			transform: rotateY(180deg);
		}
		.box:hover .down{
			transform: rotateY(0deg);
		}
		.box .up{
			height: 300px;
			background-color: red;
			text-align: center;
			font-size: 30px;
			color: white;
			z-index: 1;
			position: absolute;
			top: 0;
			left: 0;
			transform: rotateY(0deg);
			backface-visibility:hidden;
		}
		.box .down{
			height: 300px;
			background-color: green;
			text-align: center;
			font-size: 30px;
			color: white;
			position: absolute;
			top: 0;
			left: 0;
			transform: rotateY(-180deg);
			backface-visibility:hidden;
		}
	</style>
</head>
<body>
	<div class="box">
		<div class="up">正面</div>
		<div class="down">反面</div>
	</div>
</body>
</html>